#ifndef _SKY_CLEARSKY_
#define _SKY_CLEARSKY_

#include "Sun.h"
#include "../camera/SkyPhoto.h"

class CClearSky
{
public:
	CClearSky();

	void SetParas(CClearSkyParameter paras);
	void SetZenithLuminance(float zenithLuminance);
	float GetZenithLuminance();
	CSun* GetSun();
	//	deprecated
	//float RelativeLuminance(float theta, float gamma);
	//float AbsoluteLuminance(float theta, float gamma);

	void AddNewSkyPhoto(CSkyPhoto photo);
	void CalcSkyPhotoParas();
	void InitSampleFromSkyPhoto(int index);
	void SampleFromSkyPhoto(int index, CSample sample);
	void SampleFromSkyPhoto(int index, int x, int y, int r, int g, int b);
	CSkyPhoto GetSkyPhoto(int index);
	
	int GetSkyPhotoCount() {return (int)m_images.size();}
	void Glo3DPoint2SkyModelColor(float x, float y, float z, int &r, int &g, int &b);
	void SkyModelFitting(int index);
private:	
	CSun m_sun;
	//	parameters
	//CClearSkyParameter m_paras;
	//float m_zenithLuminance;

	vector<CSkyPhoto> m_images;
};

#endif